package com.scanner.net;

/**
 * 请求基础类
 */

public class HttpResult<T> extends BaseBean{
    private T result;
    private boolean status;
    private int code;
    private String message;
    private T data;//单集合类分页才是这个字段，其他的都是result字段
    private PageData pageData;

    public PageData getPageData() {
        return pageData;
    }

    public void setPageData(PageData pageData) {
        this.pageData = pageData;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T data) {
        this.result = data;
    }

    @Override
    public String toString() {
        return "DBSearchResult{" +
                "status=" + status +
                ", result=" + result +
                ", msg=" + message +
                '}';
    }

    public static class PageData {
        private int pageSize;
        private int total;

        public int getPageSize() {
            return pageSize;
        }

        public void setPageSize(int pageSize) {
            this.pageSize = pageSize;
        }

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }
    }
}